<template>
	<view class="padding-top">
		<cu-custom bgColor="bg-top" isBack>
			<block slot="content">数据监测</block>
		</cu-custom>
		<form class="" @submit="formSubmit">
			<view class="card-menu cu-list menu">
				<view class="cu-item ">
					<view class="content">
						<text class="text-orange cuIcon-roundrightfill"></text>您管理的站点
					</view>
				</view>
			</view>
			<view class="card-menu cu-list menu" >
				<view class="cu-item arrow" v-for="(item,key) in list" :key="key">
					<navigator :url="'pollList?name=' + item.name + '&mn=' + item.mn + '&siteId=' + item.site_id">
						<view class="content padding-tb-sm">
							{{item.name}}
							<view class="text-gray ">
								 {{item.site_type}}
							</view>
						</view>
					</navigator>
				</view>
			</view>
			
		</form>
	</view>
</template>

<script>
	import Util from '@/utils/util.js';
	export default {
		data() {
			return {
				list:[],
			}
		},
		onLoad() {
			let userInfo = Util.getUserInfo();
			//加载站点
			Util.request('/monitor/groupSite/sites/user', {userId:userInfo.userId}, 'GET').then((res) => {
				this.list = []
				res.data.map(item => {
					this.list.push({mn:item.siteMn,name:item.siteName,site_id:item.siteId,site_type:'暂未展示'})
				})
			})
		},
		methods: {
		}
	}
</script>

<style>

</style>
